﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MachineRoomManage.aspx.cs" Inherits="BaseData_MachineRoomManage" %>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>无标题页</title>
 <link rel="stylesheet" href ="../css/css.css" type="text/css" />
    <script src="../js/tableSelect.js" type ="text/javascript"></script>
    <!--#include file="../js/Button.js"-->
    <script src="../js/Common.js" type ="text/javascript"></script>
        <script src="../js/calendar.js" type ="text/javascript"></script>
    <script language ="javascript" type ="text/javascript" >
  function document.onkeydown()     
  {
      var   e=event.srcElement; 
      if(event.keyCode==13)
      {
         return   false; 
      }
  }
  
  function Edit_click()
    {
    var HiddenID=document.getElementById('HiddenID').value;
    if(isNull(HiddenID))
    {
        alert("请选择一条记录!");
        return false;
    }
    var url="MachineRoomForm.aspx?EditStatus=2&ID=" + HiddenID;
    
     window.open(url,"_self","");
     } 
     
     
        </script>
</head>
<body style =" background-image :url('../images/hit_bg.gif');"> 
    <% 
		Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds(-1);
		Response.Expires = 0;
		Response.CacheControl = "no-cache";
	%>
    <form id="form1" runat="server">
    <div>
<table style ="width :98%;"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
   <td valign ="middle"  style ="height :25; width :100%;" ><img id="imgIndicator" src ="../images/Indicator.jpg" style ="width :21; height :16;" alt ="当前位置" />当前位置：<asp:Label ID="Indicator" runat ="server" ></asp:Label></td>
   </tr> 
  <tr style ="height :1; background-color :#dddddd;">
    <td></td>
 </tr> 
</table> 
<table style ="width :98%;"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr style ="height :5;">
    <td></td>
 </tr> 
</table>
<table width="98%" border="0" cellpadding="0"  class="table" cellspacing="0"  align="center" >
  <tr> 
    <td colspan="6" align="center" valign="top">
    <!--搜索开始-->
    <table width="100%" border="0" align="center"  cellpadding="0" cellspacing="0">
      <tr>
       <td>
         所属区域：<asp:DropDownList ID="ddlRegionid" DataTextField ="sName" DataValueField ="id" runat="server" ></asp:DropDownList>
		 机房名称：<asp:TextBox ID="txtMroomName" runat="server"  TabIndex="3" Width="70"></asp:TextBox>					  
		 添加日期：<asp:TextBox ID="SDT" runat="server" onclick="calendardate(this,true);"  TabIndex="3" Width="80"></asp:TextBox>
		        <asp:TextBox ID="EDT" runat="server" onclick="calendardate(this,true);" TabIndex="3" Width="80"></asp:TextBox>
		  <asp:Button ID="btnSearch" runat="server" cssclass="button02" Text="查询" />

                        <asp:Label ID="LabMessage" runat="server" ForeColor="Red"></asp:Label>
                        <input type="hidden" id="HiddenID" name="HiddenID" runat="server" />
                        <input type="hidden" id="HiddenWidth" name="HiddenWidth" value = "500"  runat="server" />
                        <input type="hidden" id="HiddenHeight" name="HiddenHeight" value="180"  runat="server" />
                        <input type="hidden" id="HiddenEditPageName" name="HiddenEditPageName"  value="MachineRoomForm.aspx"  runat="server" />

                         <input id="btnAdd" type="button" onclick="javascript:window.location.href='MachineRoomForm.aspx?EditStatus=1';" value="增加" class="button05" />
                         <input id="btnEdit" runat="server" type="button" value="修改"  class="button05" onclick="Edit_click();"  />

                        <asp:Button ID="btnDelete" runat="server" CssClass="button02" Height="22px" Text="删除" />
                        <!--<asp:Button ID="btnToExcel" runat="server" CssClass="button02" Height="22px" Text="导出"/>-->
                        <asp:Button ID="btnRefresh" runat="server" Text="Button" Width="0px" Height="0px" />
                    </td>
         </tr> 
        </table> 
           
          <!--列表开始-->
  <asp:GridView ID="GridView1" runat="server" Width="100%" DataKeyNames="mroom_id" OnRowDataBound="GridView1_RowDataBound"
    ForeColor="#333333" AutoGenerateColumns="False" AllowSorting="True" AllowPaging="True"  PageSize="20" EmptyDataText="没搜索到相匹配的数据"  BorderColor="#F9F9FB" BorderStyle="Dotted" GridLines="Vertical"  >        
    <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="#F9F9FB" />
    <RowStyle BackColor="#F9F9FB" ForeColor="#333333" Height="24px"  BorderStyle="Dotted" />
    <AlternatingRowStyle BackColor="#EFEFF8" />
    <HeaderStyle BackColor="#E3E7F0" Height="25px" />
                <PagerTemplate>
                    <table width="100%">
                        <tr>
                            <td width="70%" align="right">
                                <asp:LinkButton CommandName="Page" CommandArgument="First" ID="linkBtnFirst" runat="server">首页</asp:LinkButton>
                                <asp:LinkButton CommandName="Page" CommandArgument="Prev" ID="linkBtnPrev" runat="server">上一页</asp:LinkButton>
                                <asp:LinkButton CommandName="Page" CommandArgument="Next" ID="linkBtnNext" runat="server">下一页</asp:LinkButton>
                                <asp:LinkButton CommandName="Page" CommandArgument="Last" ID="linkBtnLast" runat="server">尾页</asp:LinkButton>
                                <asp:TextBox ID="txtGoPage" class="INPUT" runat="server" MaxLength="5" Width="15px"></asp:TextBox>
                                <asp:LinkButton ID="linkBtnGo" runat="server" OnClick="linkBtnGo_Click">跳转</asp:LinkButton>
                                <asp:Label ID="labMessage" runat="server" ForeColor="Red"></asp:Label></td>
                            <td width="30%" align="right">
                                <asp:Label ID="CurrentPageLabel" runat="server" ForeColor="Blue" Text="第1页 共5页 共89条"></asp:Label>
                            </td>
                        </tr>
                    </table>
                </PagerTemplate>
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <input id="check" runat="server" type="checkbox" value='<%# Eval("mroom_id") %>' />
                        </ItemTemplate>
                        <HeaderTemplate>
                            <input id="checkAll" title="全选" onclick="javascript:CheckAll(this);" runat="server"
                                type="checkbox" />
                        </HeaderTemplate>
                        <ItemStyle Width="5%" HorizontalAlign="center"/>
                    </asp:TemplateField>
                    <asp:BoundField DataField="mroom_name" HeaderText="机房名称" SortExpression="mroom_name">
                        <ItemStyle  HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="name" HeaderText="所属区域" SortExpression="name">
                        <ItemStyle Width="25%" HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="mroom_seq" HeaderText="排序" SortExpression="mroom_seq">
                        <ItemStyle Width="20%" HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="mroom_createdate" HeaderText="添加时间" SortExpression="mroom_createdate" DataFormatString="{0:yyyy-MM-dd}" HtmlEncode="False">
                        <ItemStyle Width="25%" HorizontalAlign="Left" />                         
                    </asp:BoundField>                    
                </Columns>
            </asp:GridView>
           <!--列表结束-->           
    </td>
   </tr>
  </table>
    </div>
    </form>
</body>
</html>
